<!--<%@ page contentType="text/html;charset=UTF-8" language="java" %>-->
<%@ page contentType="text/html;charset=UTF-8" language="java" %>
<meta charset="UTF-8">
<html>

<head>
    <meta charset="UTF-8">
    <title>填写个人信息</title>
    <script type="text/javascript" src="js/jquery-3.3.1.min.js"></script>
    <script type="text/javascript" src="js/jquery.ui.widget.js"></script>
    <script type="text/javascript" src="js/jquery.iframe-transport.js"></script>
    <script type="text/javascript" src="js/jquery.fileupload.js"></script>
    <script type="text/javascript" src="Ajax/personage.js"></script>

    <script type="text/javascript">
        function uploadimg(node) {
            var id=node.id;
            console.log(id)
            var node2=$(node).parent().find("img");
            $(node).fileupload({
                url: "jsonUpload.action",
                //是不是安全的
                secureuri: false,
                fileElementId:id,
                dataType: "json",
                //是不是自动上传
                autoUpload: true,
                success: function (data) {
                    node2.attr("src",data.Path);
                }
            })
        }
    </script>
</head>

<body>
    <div id="div1" align="center">
        <table id="table1">
            <%--<tr>
                <td>上传头像：</td>
                <td>
                    <img id="viewImg" width="100px;" height="100px;" class="img-upload" src=""><br/>
                    <input type="file" id="myFile" name="myFile" onclick="uploadimg(this)">
                </td>
            </tr>--%>
            <tr>
                <td>姓名：</td>
                <td><input type="text" value="" id="username" required="required"></td>
            </tr>
            <tr>
                <td>手机号：</td>
                <td><input type="text" value="" id="tel" required="required"></td>
            </tr>
            <tr>
                <td>验证码：</td>
                <td>
                    <input type="text" value="" id="verCode" style="width: 120px;">&nbsp;&nbsp;&nbsp;&nbsp;
                    <input type="button" value="获取验证码" style="width: 100px;" onclick="getCode()" id="sendMessage"/>

                </td>
            </tr>
            <tr>
                <td>身份证号：</td>
                <td><input type="text" value="" id="UID" required="required"></td>
            </tr>
            <%--<tr>
                <td>身份证正面：</td>
                <td><img id="viewImg1" width="330px;" height="100px;" class="img-upload"><br/>
                    <input type="file" id="myFile2" name="myFile" onclick="uploadimg(this)">
                </td>
            </tr>
            <tr>
                <td>身份证反面：</td>
                <td><img id="viewImg2" width="330px;" height="100px;" class="img-upload"><br/>
                    <input type="file" id="myFile3" name="myFile" onclick="uploadimg(this)">
                </td>
            </tr>--%>
            <tr>
                <th colspan="2">
                    <input type="checkbox" id="agree" required="required"/><span>我已阅读并同意</span>
                    <a href="rules.jsp" target="_blank" style="text-decoration:none;" onclick="aaa()">《贷款服务协议》</a>
                </th>
            </tr>
            <tr>
                <th colspan="2">
                    <input type="button" id="sub" value="提交 填写调查问卷" onclick="submits()"
                           style="width: 250px; height: 40px; font-size: 26px; font-family: '微软雅黑'; background: #ef4900; color: white; border-radius: 10px;"/>
                </th>
            </tr>
        </table>
    </div>
</body>
<style>
    body {
        background: url(images/22.jpg);
        background-repeat: no-repeat;
        background-size: 100%;
        margin-top: 100px;
    }

    #table1,
    tr,
    td,
    th {
        text-align: center;
        border: 1px solid black;
        height: 50px;
    }

    #table1 {
        width: 35%;
        background-color: #CCCCCC;
        background-color: rgba(255, 255, 255, 0.5);
    }

    #table1 tr td input {
        height: 35px;
        width: 50%;
    }
</style>
</html>